@extends('layouts.app')

@section('content')
<div class="container fontSize14">
    <div class="row clear">
    	<p class="col-xs-6"><img src="{{ asset('images/history.png') }}" alt="" width="16" height="16" class="textAlign mr01">历史记录</p>
    	<div class="liHeight bgWhite col-xs-12 textRight">
	    	<!-- <span class="textRight"><a href="#" class="coloStyOragin">获奖金额<span class="underlineBlack">1000</span></a></span> -->
    	</div>
    	<div class="hisMenuBox clear mt01">
			<ul class="nav nav-tabs" id="otherInfoTab">
			    <li class=""><a href="{{ url('/stockorder') }}">全部记录</a></li>
			    <li class="active"><a href="{{ url('/rewardorder') }}">获奖记录</a></li>
			</ul>
		    <div class="fontSize12 infoListBox">
		    	<div class="tab-content">
		    		<div class="tab-pane active"  id="allRecord">
		    			@foreach($orders as $k=>$order)
			    		<div class="tab-pane-list borTop bgWhite mb01">
			    			<a href="{{ url('/show_activity',['id'=>$order->activity->id]) }}" style="padding:0;width:100%">
				  				<div class="list-nameBox clear borTopBot" style="padding:5px 0 8px 16px;">
						  			<p class="textLeft fl overNowrap" style="width:60%;color:#555;margin:5px 0 0 0;">{{ $order->stock_name }}({{ $order->stock_code }})</p>
						  			
									
									@if( $order->reward() )
						  			<p class="textAlign verAlign fr" style="width:30%;padding-right:15px;">
						  				
						  				<img src="{{ asset('images/prize02.png') }}" alt="" width="20" class="verAlign">
						  				<span style="color:#fe6703;" class="verAlign">{{ $order->reward()->money }}元</span>
						  			</p>
						  			@endif

						  			<!-- <p class="textRight verAlign fr"  style="width:30%;padding-right:15px;">
					  					<img src="{{ asset('images/prize02.png') }}" alt="" width="20" class="verAlign">
						  				<span style="color:#fe6703;" class="verAlign">100元</span>
						  			</p> -->
					  			</div>
					  			<div class="bgWhite colorThree fontSize12">
					  				<div class="col-xs-12 ">
					  					<span class="col-xs-4 textLeft liHeight03" style="padding:0;">参与活动</span>
					  					<span class="col-xs-8 textRight liHeight03 overNowrap" style="padding:0;">{{ $order->activity->name }}</span>
					  				</div>
					  				<div class="col-xs-12 textLeft">
					  					<span class="col-xs-6 textLeft liHeight03" style="padding:0;">购买时间</span>
					  					<span class="col-xs-6 textRight liHeight03" style="padding:0;">{{ $order->payment_time }}</span>
					  				</div>
					  			</div>
				  			</a>
			    		</div>
		    			@endforeach
			  			
			    		
		    		</div>
		    		
		    	</div>
		    	
			</div>
			
		<div class="textAlign liHeight tdUnderline " id="more">{!! $orders->render() !!}</div>
    	</div>
    </div>
    
    <script>
    $(function() {
    	// $("#more").unbind("click");
        // $('#otherInfoTab a:first').tab('show');//初始化显示哪个tab

        // $('#otherInfoTab a').click(function(e) {
        //     e.preventDefault();//阻止a链接的跳转行为
        //     $(this).tab('show');//显示当前选中的链接及关联的content
        // })
    })
</script>
</div>
@endsection
